package com.yunyao.framework.service;

import com.yunyao.common.dto.excel.SettlementExcelDto;
import com.yunyao.common.dto.excel.SupplyOrderExcelDto;
import com.yunyao.common.dto.project.HistoryQtDto;
import com.yunyao.common.dto.supplier.SupplierSettlementDto;
import com.yunyao.common.dto.supplier.SupplierSettlementMaterialDto;
import com.yunyao.common.dto.supplier.SupplierSettlementOrderDto;
import com.yunyao.common.web.util.PageResult;
import com.yunyao.common.web.util.YResult;
import com.yunyao.framework.dto.spreconciliatioin.SpReconciliationMaterialDto;
import com.yunyao.framework.dto.supplier.SupplierSettlementApprovalDto;
import com.yunyao.framework.dto.supplier.SupplierSettlementCheckDto;
import com.yunyao.framework.dto.supplier.SupplierSettlementConfirmDto;
import com.yunyao.framework.dto.supplier.SupplierSettlementDeletedDto;
import com.yunyao.framework.dto.supplier.SupplierSettlementSaveDto;
import com.yunyao.framework.dto.supplier.SupplierSettlementSubmitApprovalDto;
import com.yunyao.framework.vo.spreconciliation.SpReconciliationMaterialVO;
import com.yunyao.framework.vo.supplier.SupplierSettlementInfoVO;
import com.yunyao.framework.vo.supplier.SupplierSettlementMaterialVO;
import com.yunyao.framework.vo.supplier.SupplierSettlementOrderVO;
import com.yunyao.framework.vo.supplier.SupplierSettlementVO;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @author xingjishuai
 * @date 2024-07-22
 */
public interface SupplierSettlementService {

    /**
     * 供应商结算列表
     *
     * @param supplierSettlementDto
     * @return
     */
    YResult<PageResult<SupplierSettlementVO>> pageList(SupplierSettlementDto supplierSettlementDto);

    /**
     * 供应商结算材料列表
     *
     * @param supplierSettlementMaterialDto
     * @return
     */
    YResult<PageResult<SupplierSettlementMaterialVO>> materialPageList(SupplierSettlementMaterialDto supplierSettlementMaterialDto);


    YResult<PageResult<SpReconciliationMaterialVO>> getSpReconciliationMaterialListbySupplyId(SpReconciliationMaterialDto spReconciliationMaterialDto);

    /**
     * 供应商结算信息
     *
     * @param settlementDto
     * @return
     */
    YResult<SupplierSettlementInfoVO> getInfo(SupplierSettlementDto settlementDto);

    /**
     * 供应商结算确认
     *
     * @param supplierSettlementConfirmDto
     * @return
     */
    YResult<String> confirm(SupplierSettlementConfirmDto supplierSettlementConfirmDto);

    /**
     * 供应商结算订单列表
     *
     * @param supplierSettlementOrderDto
     * @return
     */
    YResult<PageResult<SupplierSettlementOrderVO>> orderPageList(SupplierSettlementOrderDto supplierSettlementOrderDto);

    BigDecimal getSupplyTaxTotalPrice(String contractId);

    /**
     * 供应商结算保存
     *
     * @param supplierSettlementSaveDto
     * @return
     */
    YResult<String> save(SupplierSettlementSaveDto supplierSettlementSaveDto);

    /**
     * 提交审核
     *
     * @param submitApprovalDto
     * @return
     */
    YResult<String> submitApproval(SupplierSettlementSubmitApprovalDto submitApprovalDto);

    /**
     * 审批
     *
     * @param approvalDto
     * @return
     */
    YResult<String> approval(SupplierSettlementApprovalDto approvalDto);

    /**
     * @param supplierSettlementCheckDto
     * @return
     */
    YResult<String> check(SupplierSettlementCheckDto supplierSettlementCheckDto);

    /**
     * 删除
     *
     * @param supplierSettlementDeletedDto
     * @return
     */
    YResult<String> deleted(SupplierSettlementDeletedDto supplierSettlementDeletedDto);

    /**
     * 云采确认
     *
     * @param supplierSettlementConfirmDto
     * @return
     */
    YResult<String> ycConfirm(SupplierSettlementConfirmDto supplierSettlementConfirmDto);

    /**
     * 统计数量，金额
     *
     * @param supplierSettlementMaterialDto
     * @return
     */
    YResult<Map<String, Object>> materialCount(SupplierSettlementMaterialDto supplierSettlementMaterialDto);

    List<SettlementExcelDto> export(SupplierSettlementDto supplierSettlementDto);
}
